package switchviz.gui.component;

import javax.swing.Box;
import javax.swing.JComponent;
import javax.swing.JPanel;

import switchviz.core.ResourceManager;

public class PaddingPanel extends JPanel
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -4647842698587142607L;

	public PaddingPanel()
	{
		super();
	}
	
	public void add(JComponent component)
	{
		if(this.getComponentCount() == 0)
			super.add(Box.createRigidArea(ResourceManager.getInstance().getComponentGap()));
		super.add(component);
		super.add(Box.createRigidArea(ResourceManager.getInstance().getComponentGap()));
	}
	
}
